<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib uri="/WEB-INF/tlds/att.tld" prefix="att"%>
<html>
<head>
	<meta name="decorator" content="moduleView" />
	<script type="text/javascript">
	
	function openModal(){
		$("#contractTypeMoadl").modal();
	}
	
	function brandAdd(){
		var contractType = $("#contractType").val();
		if(contractType == ""){
			$.jBox.tip("请选择合同类型！","${error}",{persistent:true,opacity:0});
			return;
		}
		$("#ok").attr("data-dismiss", "modal");
		var mainContractNo = $("#mainContractNo").val();
		window.open('${contextPath}/biz/contract/assrecord/brandAdd?strIds=${brandPositionLog.id}&contractType=' + contractType + "&mainContractNo="+mainContractNo
				+ "&navId=${navId}", '_self');
	}
	
	function showDiv(){
		var type = $("#contractType").val();
		if(type == 'Z600'){
			$("#mainContractNoDiv").show();				
		}else{
			$("#mainContractNoDiv").hide();
		}
	}
	</script>

</head>
<body>
	<div class="Report_f">
		<div class="Report_f_1">
				  <div class="Report_f_title_1">
				    		招商发布信息
				  </div>
	  
	
	  <div>
		    <ul class="nav nav-tabs" id="myTab">
			  <li class="active"><a href="#home" data-toggle="tab">基本信息</a></li>
			</ul> 
			<div class="tab-content">
			  <div class="tab-pane active" id="home">
			    <div class="Report_f_title_4">
			   	 <div class="f_2">
						<div class="form-group col-sm-12">
							<label for="inputtext3" class="col-sm-2	 f_4">发布标题:</label>
							<div class="col-sm-10 f_6">
								${brandPositionLog.title}
							</div>
						</div>
	
					
					
					</div>
					
					<div class="f_2">
						<div class="form-group col-sm-12">
							<label for="inputtext3" class="col-sm-2	 f_4">发布内容:</label>
							<div class="col-sm-10 f_6">
								${brandPositionLog.content}
							</div>
						</div>
	
					
					
					</div>
				  	<div class="f_2">
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5	 f_4">门店名称:</label>
							<div class="col-sm-5 f_6">
								${brandPositionLog.shop.name}
							</div>
						</div>
	
					
						<div class="form-group col-sm-7">
							<label for="inputtext3" class="col-sm-5 f_4">楼层:</label>
							<div class="col-sm-7">
								${brandPositionLog.baseFloor.name}
							</div>
						</div>
					</div>
					<div class="f_2">
							<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5	 f_4">招商编号:</label>
							<div class="col-sm-5 f_6">
								${brandPositionLog.brandPos.merchant_id}
							</div>
						</div>
					</div>
					<div class="f_3">
						<div class="form-group col-sm-7">
							<label for="inputtext3" class="col-sm-5 f_4">品牌:</label>
							<div class="col-sm-7">
								${brandPositionLog.baseBrand.brandCname}
							</div>
						</div>
						
					</div>
					
					<div class="f_2">
						<div class="form-group col-sm-7">
							<label for="inputtext3" class="col-sm-5 f_4">楼层图:</label>
							<att:down key="floor" soureBillID="${floorAttId}" modleName="com.maoye.ossp.sys.base.entity.SysBaseFloorAttment"></att:down>
						</div>
					</div>
				</div>
			  </div>
			</div> 
			<div class="o-l-action">
	    		
	    		<c:if test="${brandPositionLog.status =='10'&& userType !='SUPPLIER'}">
	    			<shiro:hasPermission name="com.maoye.ossp.biz.contract.BrandPositionlog:brandAdd">
	    				<button type="button" class="btn btn-info btn_3 btn_right" onclick="openModal()">新建意向洽谈</button>
	    			</shiro:hasPermission>
	    		</c:if>
	    		<c:if test="${brandPositionLog.status =='00'&& userType =='SUPPLIER'}">
	    			<button type="button" class="btn btn-info btn_3 btn_right" onclick="window.open('${contextPath}/biz/brand/brandPositionLog/${brandPositionLog.id}/supplierUpdate','_self')">发 起&nbsp;合 作 意 向</button>
	    		</c:if>
			</div>
		</div> 
	</div>	
  </div> 
  
<div class="modal fade" id="contractTypeMoadl" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
	<div class="modal-content">
		<!-- /modal-header -->
		<div class="modal-body">
			<table class="table">
				<tr>
					<form:form id="form" method="get"></form:form>
					<td>
						<div class="col-sm-12">
							<label for="brandAttribute_lab" class="col-sm-5 control-label">合同类型</label>
							<div class="col-sm-8 f_6">
	                        	<ossp:select dictType="CONTRACT_TYPE" name="contractType" id="contractType" onchange="showDiv()">
	                        	</ossp:select>
	                      </div>
						</div>
					</td>
				</tr>
				<tr>
					<td>
						<div class="col-sm-8" id="mainContractNoDiv" style="display: none;">
							<label for="brandAttribute_lab" class="col-sm-3 control-label">主合同号</label>
							<input type="text" class="f_5" name="mainContractNo" id="mainContractNo" style="width: 200px;">
						</div>
					</td>
				</tr>
			</table>

		</div>
		<!-- /modal-body -->
		<div class="modal-footer">
			<button type="button" id="ok_btn" 
				class="btn btn-primary" onclick="brandAdd()">确定</button>
			<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
		</div>
		<!-- /modal-footer -->
	</div>
</div>
</div> 
</body>
</html>